/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package commom;

import java.util.UUID;
import commom.Network;

/**
 *
 * @author gravena
 */
public class Host {
/**
     * For now the tuple (ip,name) must be unique. A better way to univocaly name the
     * Idea for the name: Append the time of the insertion to the IP
     */
    private String ip;
    private int port;
    private String name;
    private boolean active;
    private UUID uuid;

    public Host() {
        this.ip = "undefined";
        this.name = "Teste";
        this.active = true;
        this.port = Network.DEFAULT_PORT;
        this.uuid = UUID.randomUUID();
    }

    public Host(String ip, int port, String name, boolean active) {
        this.ip = ip;
        this.port = port;
        this.name = name;
        this.active = active;
        this.uuid = UUID.randomUUID();
    }


    public boolean isActive() {
        return active;
    }

    public void setActive(boolean active) {
        this.active = active;
    }

    public String getIp() {
        return ip;
    }

    public void setIp(String ip) {
        this.ip = ip;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getPort() {
        return port;
    }

    public void setPort(int port) {
        this.port = port;
    }

    public UUID getUUID() {
        return uuid;
    }

    public void setUUID(UUID id) {
        this.uuid = id;
    }
    
    

}
